from building import *
import os

cwd = GetCurrentDir()

inc = []

src = Glob('*.c')
src += Glob('rbtree/*.c')
src += Glob('string/*.c')
src += Glob('bitops/*.c')
src += Glob('uaccess/*.c')

group = DefineGroup('lib', src, depend=[''], CPPPATH=inc)

list = os.listdir(cwd)
for item in list:
    if os.path.isfile(os.path.join(cwd, item, 'SConscript')):
        group = group + SConscript(os.path.join(item, 'SConscript'))

Return('group')
